How to solve linear equations with two variables